package com.wisecoach.gatewayplus.transaction;

/**
 * {@code @author:} wisecoach
 * {@code @date:} 2023/3/3 上午9:40
 * {@code @version:} 1.0.0
 */


public class DefaultTransactionContext implements TransactionContext {

    private final TransactionStatus transaction;
    private TransactionContext oldTransaction;

    public DefaultTransactionContext(TransactionStatus transaction) {
        this.transaction = transaction;
    }

    @Override
    public TransactionStatus getTransaction() {
        return transaction;
    }

    @Override
    public TransactionContext getOldTransaction() {
        return oldTransaction;
    }

    @Override
    public void setOldTransaction(TransactionContext oldTransaction) {
        this.oldTransaction = oldTransaction;
    }
}
